package cn.wolfcode.crm.service.impl;

import cn.wolfcode.crm.domain.Checklist;
import cn.wolfcode.crm.mapper.ChecklistMapper;
import cn.wolfcode.crm.mapper.ClientbillMapper;
import cn.wolfcode.crm.query.QueryObject;
import cn.wolfcode.crm.service.IChecklistService;
import cn.wolfcode.crm.service.IClientbillService;
import cn.wolfcode.crm.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: crm
 * @description:
 * @author: Mr.chen
 * @create: 2018-07-07 21:45
 **/
@Service
public class ClientbillServiceImpl implements IClientbillService {
    @Autowired
    private ClientbillMapper mapper;



    @Override
    public PageResult query(QueryObject qo) {
        int total = mapper.queryForCount(qo);
        if (total == 0) {
            return new PageResult();
        }
        List<?> list = mapper.queryForList(qo);
        return new PageResult(total, list);
    }


}
